package com.ruoyi.finance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.finance.mapper.VoucherTemplateDetailMapper;
import com.ruoyi.finance.domain.VoucherTemplateDetail;
import com.ruoyi.finance.service.IVoucherTemplateDetailService;

/**
 * 凭证模板明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-03
 */
@Service
public class VoucherTemplateDetailServiceImpl implements IVoucherTemplateDetailService 
{
    @Autowired
    private VoucherTemplateDetailMapper voucherTemplateDetailMapper;

    /**
     * 查询凭证模板明细
     * 
     * @param detailId 凭证模板明细主键
     * @return 凭证模板明细
     */
    @Override
    public VoucherTemplateDetail selectVoucherTemplateDetailByDetailId(Long detailId)
    {
        return voucherTemplateDetailMapper.selectVoucherTemplateDetailByDetailId(detailId);
    }

    /**
     * 查询凭证模板明细列表
     * 
     * @param voucherTemplateDetail 凭证模板明细
     * @return 凭证模板明细
     */
    @Override
    public List<VoucherTemplateDetail> selectVoucherTemplateDetailList(VoucherTemplateDetail voucherTemplateDetail)
    {
        return voucherTemplateDetailMapper.selectVoucherTemplateDetailList(voucherTemplateDetail);
    }

    /**
     * 新增凭证模板明细
     * 
     * @param voucherTemplateDetail 凭证模板明细
     * @return 结果
     */
    @Override
    public int insertVoucherTemplateDetail(VoucherTemplateDetail voucherTemplateDetail)
    {
        return voucherTemplateDetailMapper.insertVoucherTemplateDetail(voucherTemplateDetail);
    }

    /**
     * 修改凭证模板明细
     * 
     * @param voucherTemplateDetail 凭证模板明细
     * @return 结果
     */
    @Override
    public int updateVoucherTemplateDetail(VoucherTemplateDetail voucherTemplateDetail)
    {
        return voucherTemplateDetailMapper.updateVoucherTemplateDetail(voucherTemplateDetail);
    }

    /**
     * 批量删除凭证模板明细
     * 
     * @param detailIds 需要删除的凭证模板明细主键
     * @return 结果
     */
    @Override
    public int deleteVoucherTemplateDetailByDetailIds(Long[] detailIds)
    {
        return voucherTemplateDetailMapper.deleteVoucherTemplateDetailByDetailIds(detailIds);
    }

    /**
     * 删除凭证模板明细信息
     * 
     * @param detailId 凭证模板明细主键
     * @return 结果
     */
    @Override
    public int deleteVoucherTemplateDetailByDetailId(Long detailId)
    {
        return voucherTemplateDetailMapper.deleteVoucherTemplateDetailByDetailId(detailId);
    }
}
